import { BaseUrl } from '@/setting'
import uniPromisify from '@/util/uniPromisify'

/**
 * 对比报告列表
 * @param {*} data
 * pageNum,pageSize
 */
export function getCompareList(data) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/contrastReportList`,
    data
  })
}

/**
 * 获取对比报告详情
 * @param {*} contrastId
 */
export function getCompareDetail(contrastId) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/compareReportDetail`,
    data: { contrastId }
  })
}

/**
 * 新增对比记录
 * @param {*} data
 * reportId_A 对比报告ID
 * reportId_B 被对比报告ID
 */
export function addCompare(data) {
  return uniPromisify.request({
    method: 'POST',
    url: `${BaseUrl}/api/my/system/report/addContrast`,
    data
  })
}
